Skip to content

[codex] Migrate server source control Effect services#3186

Merged
juliusmarminge merged 1 commit into
mainfrom
codex/effect-service-server-source-vcs
Jun 20, 2026
Merged

[codex] Migrate server source control Effect services#3186
juliusmarminge merged 1 commit into
mainfrom
codex/effect-service-server-source-vcs

Conversation

@juliusmarminge

@juliusmarminge juliusmarminge commented Jun 20, 2026

Copy link
Copy Markdown
Member

What changed

  • migrated the server Git, VCS, and source-control Effect services to inline Context.Service contracts
  • replaced standalone *Shape references with Service["Service"] across in-scope implementations, consumers, and tests
  • exported real make effects and canonical export const layer = Layer... values for concrete services
  • namespace-imported actual service boundaries while using named imports for config, package, error, pure/helper, and implementation-only modules
  • preserved descriptive factories/layers where a module implements an abstract port, including makeVcsDriverShape, makeVcsDriver, and vcsLayer
  • preserved VcsDriver and SourceControlProvider as polymorphic ports rather than inventing concrete constructors
  • removed the final GitWorkflowServiceShape compatibility alias and updated its remaining orchestration type reference directly

Why

This aligns these server domains with the Effect module layout used by the relay/client-runtime target state and removes duplicate service-shape declarations.

Scope

Orchestration behavior remains out of scope for #2829; its single compatibility type reference is mechanically updated so no standalone service-shape alias remains. MCP and integration-harness modules are otherwise untouched.

Validation

  • final rebased changed suites — 18 files, 185 tests passed
  • vp check — passes with 0 errors and 20 pre-existing warnings
  • vp run typecheck — 15/15 tasks passed
  • static audit: no in-scope named imports of migrated services, no namespace imports of pure/config/implementation modules, no refactor-only test declarations, and no removed comments/docs

Note

Migrate server source control and VCS Effect services to namespace imports and Effect.gen

  • Removes separate *Shape interfaces across all source control and VCS services, inlining service shapes directly into Context.Service generic parameters.
  • Converts all service factories from Effect.fn("name") to Effect.gen, and passes the resulting make effect directly to Layer.effect instead of invoking make().
  • Switches imports to namespace style (e.g. import * as GitManager) and updates all type references from GitManagerShape to GitManager.GitManager["Service"] throughout production code and tests.
  • VcsStatusBroadcaster.updateCachedStatus now publishes a unified 'snapshot' event containing both local and remote fields instead of separate events, which is a behavioral change for subscribers.

Macroscope summarized 8c8a3c9.


Note

Low Risk
Mechanical refactor with tests passing; behavior should be unchanged aside from typing and layer wiring conventions.

Overview
This PR standardizes server git, VCS, and source-control modules on the same Effect service layout used elsewhere: inline Context.Service contracts, exported make as Effect.gen, and Layer.effect(Service, make) without calling make().

Service contracts: Standalone *Shape interfaces are removed; method types live on each Context.Service class and consumers/tests use SomeService["Service"] instead of *Shape.

Factories and wiring: makeGitManager, makeGitHubCli, and similar Effect.fn factories become make via Effect.gen. GitManager returns GitManager.of(...). Registry/provider code composes providers with yield* GitHubSourceControlProvider.make (the Effect value) rather than make().

Imports: Namespace imports (import * as GitVcsDriver) replace named service imports at boundaries; pure helpers use named imports (PR decode utilities, discovery helpers). ServerConfig moves to import * as ServerConfig with layerTest at the namespace root.

Tests: Mocks and helpers updated for the new types; no orchestration/MCP scope in this diff.

Reviewed by Cursor Bugbot for commit 8c8a3c9. Bugbot is set up for automated code reviews on this repo. Configure here.

@coderabbitai

coderabbitai Bot commented Jun 20, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 52ea08e3-9188-44dd-92bd-b51ee9c2d60c

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/effect-service-server-source-vcs

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions Bot added size:XL 500-999 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. labels Jun 20, 2026
@github-actions

github-actions Bot commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

🚀 Expo continuous deployment is ready!

  • Project → t3-code
  • Platforms → android, ios
  • Scheme → t3code-preview
  🤖 Android 🍎 iOS
Fingerprint fe5a51f2e189da69dfc4c2cd458e6cfb5fdff2ea ae3bd597809dfd7771d0898f735d172973d4c1c8
Build Details Build Permalink
DetailsDistribution: INTERNAL
Build profile: preview:dev
Runtime version: fe5a51f2e189da69dfc4c2cd458e6cfb5fdff2ea
App version: 0.1.0
Git commit: dee105b7e9dbc270da95bd3ca0366d7a6c80b035
Build Permalink
DetailsDistribution: INTERNAL
Build profile: preview:dev
Runtime version: ae3bd597809dfd7771d0898f735d172973d4c1c8
App version: 0.1.0
Git commit: d5d0b2332c4f1477d040363277fa6c2639bb84b8
Update Details Update Permalink
DetailsBranch: pr-3186
Runtime version: fe5a51f2e189da69dfc4c2cd458e6cfb5fdff2ea
Git commit: d5d0b2332c4f1477d040363277fa6c2639bb84b8
Update Permalink
DetailsBranch: pr-3186
Runtime version: ae3bd597809dfd7771d0898f735d172973d4c1c8
Git commit: d5d0b2332c4f1477d040363277fa6c2639bb84b8
Update QR

@juliusmarminge juliusmarminge marked this pull request as ready for review June 20, 2026 02:06
macroscopeapp[bot]
macroscopeapp Bot previously approved these changes Jun 20, 2026
@macroscopeapp

macroscopeapp Bot commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved

Mechanical migration of Effect.js service patterns - moves interface definitions inline, updates import styles, and adjusts factory patterns. No runtime behavior changes; all logic remains identical with only structural reorganization.

You can customize Macroscope's approvability policy. Learn more.

@juliusmarminge juliusmarminge force-pushed the codex/effect-service-server-source-vcs branch from 2b744a3 to 3d73bd6 Compare June 20, 2026 02:45
@macroscopeapp macroscopeapp Bot dismissed their stale review June 20, 2026 02:45

Dismissing prior approval to re-evaluate 3d73bd6

macroscopeapp[bot]
macroscopeapp Bot previously approved these changes Jun 20, 2026
@juliusmarminge juliusmarminge force-pushed the codex/effect-service-server-source-vcs branch from 3d73bd6 to 4d0d742 Compare June 20, 2026 03:18
@macroscopeapp macroscopeapp Bot dismissed their stale review June 20, 2026 03:19

Dismissing prior approval to re-evaluate 4d0d742

macroscopeapp[bot]
macroscopeapp Bot previously approved these changes Jun 20, 2026
@juliusmarminge juliusmarminge force-pushed the codex/effect-service-server-source-vcs branch from 4d0d742 to 265cc07 Compare June 20, 2026 03:58
@macroscopeapp macroscopeapp Bot dismissed their stale review June 20, 2026 03:58

Dismissing prior approval to re-evaluate 265cc07

macroscopeapp[bot]
macroscopeapp Bot previously approved these changes Jun 20, 2026
@juliusmarminge juliusmarminge force-pushed the codex/effect-service-server-source-vcs branch from 265cc07 to 73a92f3 Compare June 20, 2026 04:24
@macroscopeapp macroscopeapp Bot dismissed their stale review June 20, 2026 04:25

Dismissing prior approval to re-evaluate 73a92f3

@juliusmarminge juliusmarminge force-pushed the codex/effect-service-server-source-vcs branch 3 times, most recently from a20b601 to 90cda0f Compare June 20, 2026 04:42
macroscopeapp[bot]
macroscopeapp Bot previously approved these changes Jun 20, 2026
@juliusmarminge juliusmarminge force-pushed the codex/effect-service-server-source-vcs branch from 90cda0f to 4141043 Compare June 20, 2026 05:00
@macroscopeapp macroscopeapp Bot dismissed their stale review June 20, 2026 05:00

Dismissing prior approval to re-evaluate 4141043

Co-authored-by: codex <codex@users.noreply.github.com>
@juliusmarminge juliusmarminge force-pushed the codex/effect-service-server-source-vcs branch from 4141043 to 8c8a3c9 Compare June 20, 2026 05:02
@juliusmarminge juliusmarminge merged commit d9e9539 into main Jun 20, 2026
15 checks passed
@juliusmarminge juliusmarminge deleted the codex/effect-service-server-source-vcs branch June 20, 2026 05:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XL 500-999 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant